package cubelabs.nexus.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import cubelabs.nexus.entity.CounsellingEventStatus;
import cubelabs.nexus.entity.Invitation;

@Repository("invitationDAO")
public class InvitationDAO extends BaseDAO<Invitation, Serializable>{

	public List<Invitation> findToInvitionsByUserId(Long userId){
		/*CounsellingAcceptor counsellingAcceptor = new CounsellingAcceptor();
		User user = new User();
		user.setId(userId);
		counsellingAcceptor.setUser(user);*/
		List<Invitation> invitations = findByCriteria(Restrictions.eq("invitee.id", userId));
		return invitations;
	}
	
}